package com.powernode.springboot;

import com.powernode.springboot.bean.Vip;
import com.powernode.springboot.repository.VipMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@MapperScan(basePackages = "com.powernode.springboot.repository")
@SpringBootApplication
public class Springboot006MybatisGeneratorApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext applicationContext = SpringApplication.run(Springboot006MybatisGeneratorApplication.class, args);
		VipMapper vipMapper = applicationContext.getBean(VipMapper.class);
		//Vip vip = new Vip("liu","xiaomo","2001-9-9");
		//vipMapper.deleteByPrimaryKey(4L);
		Vip vip1 = vipMapper.selectByPrimaryKey(1L);
		System.out.println(vip1);
		applicationContext.close();
	}

}
